<?php
/**
 * テスト用
 */
require_once 'init.php';

//UT::ddump();

//$res = 1/0;

UT::ddump('start');

$obj[0] = FTDB::factory('M_findingsData');

//UT::ddump('factory after1');

if ($obj[0]->getError()) {
    UT::ddump($obj[0]->getError());
} else {
//    UT::ddump('obj1');
//    $obj[0]->_close();
//    UT::ddump($obj[0]->ping());
//    UT::ddump($obj[0]->select());
//$rows = $obj[0]->select();
//UT::ddump('a');
$num = $obj[0]->count();
$row = $obj[0]->getRow();
//UT::ddump($num);
UT::ddump($row);
/*
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();

$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();

$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();

$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();
$num = $obj[0]->_getTableInfo();

UT::ddump('aaaa');

UT::ddump($num);
*/

$num = $obj[0]->_getTableInfo();
UT::ddump($num);
//UT::ddump('bbbb');

//UT::ddump(is_array(CC::cacheGet(PREFIX_DB_CACHE_FILE.'_tableInfo', PATH_DB_INFO)));
//UT::ddump(CC::cacheSet($num, PREFIX_DB_CACHE_FILE.'_tableInfo', PATH_DB_INFO));
//UT::ddump(is_array(CC::cacheGet(PREFIX_DB_CACHE_FILE.'_tableInfo', PATH_DB_INFO)));
}
//UT::ddump($obj[0]->traceSql());
//UT::ddump('start2');
$obj[1] = FTDB::factory('test');
//UT::ddump('factory after2');
if ($obj[1]->getError()) {
    UT::ddump($obj[1]->getError());
} else {
//    UT::ddump('obj2');
//    $obj[1]->_close();
//    UT::ddump($obj[1]->ping());
//    UT::ddump($obj[1]->select());
}
//UT::ddump($obj[1]->traceSql());
//$res = 1/0;

$t = 'UT';
//call_user_func(array($t,'ddump'), 'end');
UT::ddump('end');
?>